﻿@model Web7.Container.Models.UserRoleShipRecord
<div>
    @using (Html.BeginForm("Edit", "User", FormMethod.Post))
    {
        <div>
            @T("用户编辑")
        </div>
        <fieldset>
            <table>
                <tr>
                    <td>
                        UserName
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.TextBox("UserName",Model.CurrentUser.UserName)
                        @Html.Hidden("Id" ,Model.CurrentUser.Id)
                    </td>
                </tr>
                <tr>
                    <td>
                        Email
                    </td>
                </tr>
                <tr>
                    <td>
                        @Html.TextBox("Email",Model.CurrentUser.Email)
                    </td>
                </tr>
                <tr>
                    <td>
                        Roles
                    </td>
                </tr>
                <tr>
                    <td>
                        @foreach (var item in Model.AllRole )
                        {
                            <label> @Html.CheckBox("RoleIds", Model.RoleMemberOfUser.Any(x => x.Id == item.Id), new { value = item.Id }) @item.RoleName</label><br />
                        }                       
                    </td>
                </tr>
            </table>
            <input type="submit" name="User.Edit" value="@T("Save")" />
        </fieldset>
    }
</div>
